﻿using PagedList;
using BlogSystem.Data.Entity;
using BlogSystem.Model.Request;
using BlogSystem.Model.Respones;

namespace BlogSystem.Service;

public interface IUserService
{
    /// <summary>
    ///  分页查询
    /// </summary>
    /// <param name="keyWord"></param>
    /// <param name="pageIndex"></param>
    /// <param name="pageSize"></param>
    /// <returns></returns>
    Task<IQueryable<UserResponse>> GetUsersByPage(string keyWord,int pageIndex,int pageSize);

  /// <summary>
  /// 登录
  /// </summary>
  /// <param name="loginRequets"></param>
  /// <returns></returns>
  Task<string> Login(LoginRequets loginRequets);
  
  /// <summary>
  /// 注册
  /// </summary>
  /// <param name="registerRequest">请求携带参数体</param>
  /// <returns></returns>
  Task<bool> Register(RegisterRequest registerRequest);
  

/// <summary>
///  根据用户的name获取信息
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
    Task<UserResponse> getUserByName(string name);
}